package myky.com.doctorapp.adapter

import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.BaseViewHolder
import com.facebook.drawee.view.SimpleDraweeView

import myky.com.doctorapp.R
import myky.com.doctorapp.entity.FollowDoctorEntity
import myky.com.doctorapp.utils.UriUtils

/**
 * Description:
 *
 * @author wuyangwuyang
 * Created by 2019/3/19 on 11:09
 */
class FollowDoctorListAdapter(data: List<FollowDoctorEntity.DataBean>?) : BaseQuickAdapter<FollowDoctorEntity.DataBean, BaseViewHolder>(R.layout.activity_follow_doctor_list_adapter, data) {

    override fun convert(helper: BaseViewHolder, item: FollowDoctorEntity.DataBean) {
        var simpleDraweeView = helper.getView<SimpleDraweeView>(R.id.follow_adapter_header)
        simpleDraweeView.setImageURI(UriUtils.getUriInstance().getUri(item.headPhoto))
        helper.setText(R.id.realname,item.realname)
        helper.setText(R.id.level,item.adminname)
        helper.setText(R.id.department,item.departmentname)
        helper.setText(R.id.hospital,item.hospitalname)
        helper.addOnClickListener(R.id.rootLayout)
    }
}
